import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';

import { MatIconModule } from '@angular/material/icon';
import { MatMenuModule } from '@angular/material/menu';
import {CdkTreeModule} from '@angular/cdk/tree';
import {MatButtonModule} from '@angular/material/button';
import {MatTreeModule} from '@angular/material/tree';

import { BaseSharedModule } from '@base/shared.module';

import { BreadcrumbModule, BaseConfirmDialogModule, BaseSidebarModule } from '@base/components';

import {PermitComponent} from './permit.component';
import {SettingPermitService} from './permit.service';
import { PermitFormDialogComponent} from './permit-form/permit-form.component';
import {MatToolbarModule} from '@angular/material/toolbar';
import {MatFormFieldModule} from '@angular/material/form-field';
import {MatDatepickerModule} from '@angular/material/datepicker';
import {MatInputModule} from '@angular/material/input';
import {MatDialogModule} from '@angular/material/dialog';
import {MatSelectModule} from '@angular/material/select';

const routes: Routes = [
    {
        path     : 'basic/permissions/permit',
        component: PermitComponent,
        resolve  : {
            data: SettingPermitService
        }
    }
];

@NgModule({
    declarations: [
        PermitComponent,
        PermitFormDialogComponent
    ],
    imports: [
        RouterModule.forChild(routes),

        MatIconModule,

        BaseSharedModule,
        BreadcrumbModule,
        BaseSharedModule,
        BaseConfirmDialogModule,
        BaseSidebarModule,
        MatMenuModule,
        CdkTreeModule,
        MatButtonModule,
        MatTreeModule,
        MatToolbarModule,
        MatFormFieldModule,
        MatDatepickerModule,
        MatInputModule,
        MatDialogModule,
        MatSelectModule
    ],
    providers: [
        SettingPermitService
    ],
    entryComponents: [
        PermitFormDialogComponent
    ]
})
export class PermitModule
{
}